package com.study.designpatterns.strategy;


import com.study.designpatterns.strategy.behavior.FlyNoWay;
import com.study.designpatterns.strategy.behavior.QuackZhiZhi;

/**
 * @author: jzhou
 * @date: 2025/6/14-22:10
 * @version: 1.0
 * @description: 橡皮鸭实现类
 */
public class RubberDuck extends Duck {
    // 橡皮鸭不会飞行，吱吱叫
    public  RubberDuck() {
        this.fly = new FlyNoWay();
        this.quack = new QuackZhiZhi();
    }

    @Override
    public void display() {
        System.out.println("外观是橡皮鸭");
    }
}
